<?php
class AdDelAction extends AdminAction
{
	public function __construct()
	{
		parent::__construct();
		$this->responseType = 'tpl';
		$this->layout = 'result';
	}

	public function execute()
	{
		$adService		= new AdService();
		$id				= $this->context->get('id');
		if(is_numeric($id) && $id)
		{
			$adService->del($id);
		}
		
		$this->data['forward'] = C('Lturl')->generate('Ad', 'Index');
		
		$this->data['title'] 	= '删除成功';
		$this->message			= '删除成功';
	}
}
